﻿@using Resources;
@model sipfe.model.dataAccess.SIPMaePolitica
@{             
            
        var tippoli = new List<SelectListItem> { 
        new SelectListItem { Text = "BECA", Value = "2109"},
        new SelectListItem { Text = "CREDITO", Value = "2110"},
        new SelectListItem { Text = "PABE", Value = "2280"},
        new SelectListItem { Text = "PROYECTO", Value = "2281"}
    };
        var tipmedida = new List<SelectListItem> { 
        new SelectListItem { Text = "VENTAS", Value = "1"},
        new SelectListItem { Text = "PRODUCCION", Value = "2"},
        new SelectListItem { Text = "LOGISTICO", Value = "3"},
        new SelectListItem { Text = "INFRAESTRUCTURA", Value = "4"},
        new SelectListItem { Text = "FINANCIERA", Value = "5"},
        new SelectListItem { Text = "PERSONAL", Value = "6"}
    };
        var unimedida = new List<SelectListItem> { 
        new SelectListItem { Text = "PORCENTAJE", Value = "1"},        
        new SelectListItem { Text = "INDICE", Value = "2"}
    };
}
<script type="text/javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript">
    $(function () {        
        calendarioGeneral('dFecIniVig', '0');
        calendarioGeneral('dFecFinVig', '0');
        calendarioGeneral('dFecAprob', '0');
        calendarioGeneral('dFecMeta', '0');        
    });
</script>
@using (Html.BeginForm("AddNuevaPolitica", "Politica", FormMethod.Post))
{   
    <br />
    <fieldset style="width:800px;">
        <legend><span>Datos Generales de la Politica</span></legend>
        <table border="0">
            <tr>
                <td>Tipo Politica<span class="asterisco">(*)</span></td>
                <td>Inicio Vigencia<span class="asterisco">(*)</span></td>
                <td>Fin Vigencia</td>
                <td>Fecha Aprobación<span class="asterisco">(*)</span></td>
                <td>N° Sesión Cons.Directivo<span class="asterisco">(*)</span></td>                
            </tr>
            <tr>
                <td>@Html.DropDownList("nIdeTipoPoli", tippoli, "--Seleccione--")</td>                
                <td>@Html.TextBox("dFecIniVig", null, new { style = "width:60px;", maxlength = 10 }) </td>
                <td>@Html.TextBox("dFecFinVig", null, new { style = "width:60px;", maxlength = 10 })</td>
                <td>@Html.TextBox("dFecAprob", null, new {style = "width:60px;", maxlength = 10 })</td>                
                <td>@Html.TextBox("nSesion", null, new { style = "width:80px;", maxlength = 10, onkeypress = "return validarSoloNumeros(event);" })</td>
            </tr>
            <tr>
                <td>Función:<span class="asterisco">(*)</span></td>
                <td colspan="4">@Html.TextArea("vFunciPoli", null, new { style = "width:680px;height:30px;", onblur = "javascript:onBlurUpper(this);", maxlength = 450, ondblclick = "javascript:cleanBox(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 450);" })</td>               
            </tr>
            <tr>
                <td>Sumilla:<span class="asterisco">(*)</span></td>
                <td colspan="4">@Html.TextArea("vSumiPoli", null, new { style = "width:680px;height:30px;", onblur = "javascript:onBlurUpper(this);", maxlength = 450, ondblclick = "javascript:cleanBox(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 450);" })</td>
            </tr>
            <tr>
                <td>Descripción:<span class="asterisco">(*)</span></td>
                <td colspan="4">@Html.TextArea("vDescrPoli", null, new { style = "width:680px;height:30px;", onblur = "javascript:onBlurUpper(this);", maxlength = 450, ondblclick = "javascript:cleanBox(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 450);" })</td>
            </tr>
            <tr>
                <td>Politica Asociada:<span class="asterisco">(*)</span></td>
                <td colspan="4">
                    <table>
                        <tr>               
                            <td>Tipo<span class="asterisco">(*)</span></td>
                            <td>Número<span class="asterisco">(*)</span></td> 
                        </tr>
                        <tr>
                            <td>@Html.DropDownList("nIdeTipoPoliAso", tippoli, "--Seleccione--")</td>                           
                            <td>@Html.TextBox("nPoliAso", null, new { style = "width:100px;", maxlength = 4, onkeypress = "return validarSoloNumeros(event);" })</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <hr />
        <table>
            <tr>
                <td>Adjunto :</td>                
                <td>
                    <input type="file" style="width:660px;"  class="textBoxMin tituloCelesteB8" name="idAdjunto" id="idAdjunto"  onchange="javscript:validaAdjuntoDerivar(this);" />
                </td>
             </tr>
        </table>
    </fieldset>

    <br />
    <br />
    <fieldset>
        <legend><span>Medidas Gerenciales para la Aplicación de la Politica</span></legend>
        <table class="tablaInput2" id="rpp" border="1">
        <tbody id="tbody1">
        <tr id="tr1">
            <td class="bg1" id="tdDiv1">
                <div id="divPag2">1</div>
                <input type="hidden"  id="inputPag2" name="inputPag2"  value="1"/>
            </td>
            <td id="td1">
                <table class="tablaInput3" id="merry">
                    <tr id="trDuplicar">
                        <td>
                            <table class="tablaInput3" id="francisco">
                            <tbody class="center">
                                <tr>
                                    <td>Tipo de Medida<span class="asterisco">(*)</span></td>
                                    <td>Texto de la Medida<span class="asterisco">(*)</span></td>
                                    <td>Valor Indicador Meta<span class="asterisco">(*)</span></td>
                                    <td>Unidad de Medida de Indicador Meta<span class="asterisco">(*)</span></td>
                                    <td>Fecha Estimada Lograr Meta<span class="asterisco">(*)</span></td>
                                </tr>
                                <tr id="trExitosa1">
                                    <td>                                        
                                        @Html.HiddenFor(model => model.nIdePoli)                                        
                                        @Html.DropDownList("nIdeMedida", tipmedida, "--Seleccione--") 
                                    </td>
                                    <td>
                                        @Html.TextBox("vDescrMedida", null, new { style = "width:100px;", maxlength = 20 })
                                    </td>
                                    <td>
                                        @Html.TextBox("valorMeta", null, new { style = "width:100px;", maxlength = 20 })
                                    </td>
                                    <td>
                                       @Html.DropDownList("nIdeMeta", unimedida, "--Seleccione--") 
                                    </td>  
                                    <td>@Html.TextBox("dFecMeta", null, new { maxlength = 10 })</td>                          
                                </tr>
                                <tr><td colspan="4"><hr /></td></tr>                                
                            </tbody>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>            
            <td style="width:10px;" id="imgPrincipal">
                <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINARPRIN" id="imgBorrarPrincipal" style="display:none" onclick="javascript:deleteConceptoPrincipal(this,4,2);"   />
                <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGARPRIN"  id="imgAgregarPrincipal" onclick="javascript:clonarConceptoPrincipal(this,4);"/>
            @*<img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregar" onclick="javascript:clonarTrObjetoPersona(this,'tdImgPersona','7',4);"/>*@
            </td>                        
        </tr>
    </tbody>
    </table>
        <table>
        <tr>
            <td style="height:30px;width:400px;">Campo Obligatorio:<span class="asterisco">(*)</span></td>
            <td><input type="button" value="Registrar" onclick="javascript: addNuevaPolitica(this, this.form);" /></td>
        </tr>
    </table>
     @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
    </fieldset>
    <div id="divTarifario"></div>
}

